package com.forlgb.powercloud.seata.common.rpc;

import com.forlgb.powercloud.seata.common.dto.CommodityDTO;
import com.forlgb.powercloud.seata.common.response.ObjectResponse;
import com.forlgb.powercloud.seata.common.rpc.fallback.IFeignStorageClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "seata-storage-service",fallback = IFeignStorageClientFallback.class)
public interface IFeignStorageClient {
    /**
     * 扣减账户余额
     */
    @PostMapping("/storage/dec_storage")
    ObjectResponse decreaseStorage(@RequestBody CommodityDTO commodityDTO);
}
